package com.hvgroup.modules.dify.service.dto;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;

@Data
public class AppsDto implements Serializable {

    @ApiModelProperty(value = "主键ID")
    private String id;

    @ApiModelProperty(value = "租户ID")
    private String tenantId;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "模式")
    private String mode;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "图标背景")
    private String iconBackground;

    private Boolean isCommQa;

    @ApiModelProperty(value = "状态")
    private String status;

    @ApiModelProperty(value = "创建时间")
    private Timestamp createdAt;

    @ApiModelProperty(value = "更新时间")
    private Timestamp updatedAt;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "图标类型")
    private String iconType;

    @ApiModelProperty(value = "创建者")
    private String createdBy;

    @ApiModelProperty(value = "更新者")
    private String updatedBy;

    @ApiModelProperty(value = "是否用图标作为回答头像")
    private Boolean useIconAsAnswerIcon;


    public void setMode(Integer mode) {
        switch (mode) {
            case 1:this.mode = "dify";break;
            case 2:this.mode = "coze";break;
            default:this.mode = "<unk>";break;
        }
    }

    public void setMode(String mode) {
        this.mode = mode;
    }
}
